Options
In this lesson, we'll discuss various options for frontend integration.
We'll cover the following
There are different options for frontend integration.
Links#
The easiest options are links. One frontend displays a link that another frontend handles. The World Wide Web (WWW) is based on precisely this mechanism, a system creating a link to another system.
Redirects#
Redirects represent another option.
For example, OAuth2 uses this approach:
- A website provides a link to an OAuth2 provider such as Facebook or Google.
- The user enters their password and confirms that the website is allowed to access certain information.
- The user is then redirected back to the original website by another redirect. Behind the scenes, the website receives the user’s data.
Redirects can combine frontend integration with data transfer in the background.
Transclusions#
Finally, there are various kinds of transclusion. This involves combining the content of a website with the content of another website.
This can be done either on the server or on the client. Chapter 4 shows an example where transclusion is implemented on the client with JavaScript. Chapter 5, on the other hand, shows transclusion on the server-side with ESI (Edge Side Includes).
The blog article at https://www.innoq.com/en/blog/transclusion/ gives an overview of further possibilities.
These options can, of course, be combined, however, this leads to a high level of technical complexity. Therefore, you should first try to get by with just links because they have very low complexity, and only add more options if needed.
Q U I Z
What are the differences between redirects and links? (Need author’s opinion here)
A)
Redirects only work with OAuth2.
B)
Redirects use a link but the linked microservice also redirects the user back to the original microservice.
C)
Links can transfer data in the background, redirects can’t.
In the next lesson, we’ll discuss resource-oriented client architecture.